# 定义一个父类Animal
class Animal:
    def __init__(self, name):
        self.name = name

    def speak(self):
        print("Animal is speaking")


# 定义一个父类Flyable
class Flyable:
    def fly(self):
        print("Flying high in the sky")


# 定义一个子类Bird，同时继承Animal和Flyable
class Bird(Animal, Flyable):
    def __init__(self, name, species):
        super().__init__(name)
        self.species = species

    def speak(self):
        print("Bird is chirping")

    def wag_tail(self):
        print("Bird is wagging its tail")


# 创建一个Bird对象
bird = Bird("Sparrow", "Small Bird")
print(bird.name)  # 输出：Sparrow
print(bird.species)  # 输出：Small Bird
bird.speak()  # 输出：Bird is chirping
bird.fly()  # 输出：Flying high in the sky
bird.wag_tail()  # 输出：Bird is wagging its tail
